package jmc.skweb.core.model;

// Generated 22/09/2011 00:18:30 by Hibernate Tools 3.2.0.b9

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * Items generated by hbm2java
 */
@Entity
@Table(name = "Items", schema = "texsur.dbo")
public class Items implements java.io.Serializable {

		
	private Date fecha;
	private Integer genteNr = 0;
	private String articulo = "";
	private Integer nrInt = 0;
	private BigDecimal cant1 = new BigDecimal(0);
	private BigDecimal cant2 = new BigDecimal(0);
	private BigDecimal cant1entregado = new BigDecimal(0);
	private BigDecimal cant2entregado = new BigDecimal(0);
	private Integer exi = 0;
	private BigDecimal precio = new BigDecimal(0);;
	private BigDecimal bonif = new BigDecimal(0);
	private BigDecimal descu = new BigDecimal(0);;
	private BigDecimal alto= new BigDecimal(0);;
	private BigDecimal ancho= new BigDecimal(0);;
	private String nrFabInt = "";
	private String nrCompInt = "";
	private String obser = "";
	private String descrip ="";
	private String letra = "";
	private Date fechaTransac;
	private BigDecimal preCosto = new BigDecimal(0);;
	private String talle = "";
	private Colores colores ;
	private BigDecimal totalItem = new BigDecimal(0);;
	private BigDecimal totalImpuesto = new BigDecimal(0);;
	private Float porcentajeImpuesto = 0f;
	private TipoComprob tipoComprob; 
	private ItemsId id = new ItemsId();
	private String clave;	
	private String bonif1= "";
	private String bonif2= "";
	private String bonif3= "";
	private String bonif4= "";
	private BigDecimal saldo = new BigDecimal(0);
	private BigDecimal variacionPrecio = new BigDecimal(0);
	private Integer tipoVariacionPrecio ;
	
	
	
	
	@Transient
	public BigDecimal getVariacionPrecio() {
		return variacionPrecio;
	}

	public void setVariacionPrecio(BigDecimal variacionPrecio) {
		this.variacionPrecio = variacionPrecio;
	}

	@Transient
	public Integer getTipoVariacionPrecio() {
		return tipoVariacionPrecio;
	}

	public void setTipoVariacionPrecio(Integer tipoVariacionPrecio) {
		this.tipoVariacionPrecio = tipoVariacionPrecio;
	}

	@Transient
	public BigDecimal getSaldo() {
		return saldo;
	}

	public void setSaldo(BigDecimal saldo) {
		this.saldo = saldo;
	}

	public Items(String clave, String descrip, BigDecimal cant1,BigDecimal cant1entregado, BigDecimal saldo) {
		this.clave = clave;
		this.descrip = descrip;
		this.cant1 = cant1;
		this.cant1entregado = cant1entregado;
		this.saldo = saldo;
	}

	public Items() {
	}
		
	public Items(byte[] unico, Transac transac, Integer tipoComprob, Date fecha,
			Integer genteNr, Integer itemNr, String articulo, BigDecimal cant1,
			BigDecimal cant2, BigDecimal cant1entregado, BigDecimal cant2entregado, Integer exi,
			BigDecimal precio, BigDecimal bonif, BigDecimal descu, BigDecimal alto,
			BigDecimal ancho, Date fechaTransac, BigDecimal preCosto) {
		
		
		this.fecha = fecha;
		this.genteNr = genteNr;
		this.articulo = articulo;
		this.cant1 = cant1;
		this.cant2 = cant2;
		this.cant1entregado = cant1entregado;
		this.cant2entregado = cant2entregado;
		this.exi = exi;
		this.precio = precio;
		this.bonif = bonif;
		this.descu = descu;
		this.alto = alto;
		this.ancho = ancho;
		this.fechaTransac = fechaTransac;
		this.preCosto = preCosto;
	}

	public Items(byte[] unico, Transac transac, Integer tipoComprob, Date fecha,
			Integer genteNr, Integer itemNr, String articulo, Integer nrInt,
			BigDecimal cant1, BigDecimal cant2, BigDecimal cant1entregado,
			BigDecimal cant2entregado, Integer exi, BigDecimal precio, BigDecimal bonif,
			BigDecimal descu, BigDecimal alto, BigDecimal ancho, String nrFabInt,
			String nrCompInt, String obser, String descrip, String letra,
			Date fechaTransac, BigDecimal preCosto, String talle, Integer colo) {
		
		this.fecha = fecha;
		this.genteNr = genteNr;
		this.articulo = articulo;
		this.nrInt = nrInt;
		this.cant1 = cant1;
		this.cant2 = cant2;
		this.cant1entregado = cant1entregado;
		this.cant2entregado = cant2entregado;
		this.exi = exi;
		this.precio = precio;
		this.bonif = bonif;
		this.descu = descu;
		this.alto = alto;
		this.ancho = ancho;
		this.nrFabInt = nrFabInt;
		this.nrCompInt = nrCompInt;
		this.obser = obser;
		this.descrip = descrip;
		this.letra = letra;
		this.fechaTransac = fechaTransac;
		this.preCosto = preCosto;
		this.talle = talle;
		
	}

	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "transacNr", column = @Column(name = "transacNr", nullable = false)),
			@AttributeOverride(name = "itemNr", column = @Column(name = "itemNr", nullable = false)) })
	public ItemsId getId() {
		return this.id;
	}

	public void setId(ItemsId id) {
		this.id = id;
	}

	
	
	@Column(name = "Fecha", nullable = false, length = 16)
	public Date getFecha() {
		return this.fecha;
	}

	public void setFecha(Date fecha) {
		this.fecha = fecha;
	}

	@Column(name = "GenteNr", nullable = false)
	public Integer getGenteNr() {
		return this.genteNr;
	}

	public void setGenteNr(Integer genteNr) {
		this.genteNr = genteNr;
	}

	@Column(name = "Articulo ", nullable = false, length = 13)
	public String getArticulo() {
		return this.articulo;
	}

	public void setArticulo(String articulo) {
		this.articulo = articulo;
	}

	@Column(name = "NrInt")
	public Integer getNrInt() {
		return this.nrInt;
	}

	public void setNrInt(Integer nrInt) {
		this.nrInt = nrInt;
	}

	@Column(name = "Cant1", nullable = false, precision = 24, scale = 0)
	public BigDecimal getCant1() {
		return this.cant1;
	}

	public void setCant1(BigDecimal cant1) {
		this.cant1 = cant1;
	}

	@Column(name = "Cant2", nullable = false, precision = 24, scale = 0)
	public BigDecimal getCant2() {
		return this.cant2;
	}

	public void setCant2(BigDecimal cant2) {
		this.cant2 = cant2;
	}

	@Column(name = "Cant1Entregado", nullable = false, precision = 24, scale = 0)
	public BigDecimal getCant1entregado() {
		return this.cant1entregado;
	}

	public void setCant1entregado(BigDecimal cant1entregado) {
		this.cant1entregado = cant1entregado;
	}

	@Column(name = "Cant2Entregado", nullable = false, precision = 24, scale = 0)
	public BigDecimal getCant2entregado() {
		return this.cant2entregado;
	}

	public void setCant2entregado(BigDecimal cant2entregado) {
		this.cant2entregado = cant2entregado;
	}

	@Column(name = "Exi", nullable = false)
	public Integer getExi() {
		return this.exi;
	}

	public void setExi(Integer exi) {
		this.exi = exi;
	}

	@Column(name = "Precio", nullable = false, scale = 4)
	public BigDecimal getPrecio() {
		return this.precio;
	}

	public void setPrecio(BigDecimal precio) {
		this.precio = precio;
	}

	@Column(name = "Bonif", nullable = false, precision = 24, scale = 0)
	public BigDecimal getBonif() {
		return this.bonif;
	}

	public void setBonif(BigDecimal bonif) {
		this.bonif = bonif;
	}

	@Column(name = "Descu", nullable = false, precision = 24, scale = 0)
	public BigDecimal getDescu() {
		return this.descu;
	}

	public void setDescu(BigDecimal descu) {
		this.descu = descu;
	}

	@Column(name = "Alto", nullable = false, precision = 24, scale = 0)
	public BigDecimal getAlto() {
		return this.alto;
	}

	public void setAlto(BigDecimal alto) {
		this.alto = alto;
	}

	@Column(name = "Ancho", nullable = false, precision = 24, scale = 0)
	public BigDecimal getAncho() {
		return this.ancho;
	}

	public void setAncho(BigDecimal ancho) {
		this.ancho = ancho;
	}

	@Column(name = "NrFabInt", length = 10)
	public String getNrFabInt() {
		return this.nrFabInt;
	}

	public void setNrFabInt(String nrFabInt) {
		this.nrFabInt = nrFabInt;
	}

	@Column(name = "NrCompInt", length = 10)
	public String getNrCompInt() {
		return this.nrCompInt;
	}

	public void setNrCompInt(String nrCompInt) {
		this.nrCompInt = nrCompInt;
	}

	@Column(name = "Obser", length = 50)
	public String getObser() {
		return this.obser;
	}

	public void setObser(String obser) {
		this.obser = obser;
	}

	@Column(name = "Descrip", length = 1024)
	public String getDescrip() {
		return this.descrip;
	}

	public void setDescrip(String descrip) {
		this.descrip = descrip;
	}

	@Column(name = "Letra", length = 1)
	public String getLetra() {
		return this.letra;
	}

	public void setLetra(String letra) {
		this.letra = letra;
	}

	@Column(name = "FechaTransac", nullable = false, length = 23)
	public Date getFechaTransac() {
		return this.fechaTransac;
	}

	public void setFechaTransac(Date fechaTransac) {
		this.fechaTransac = fechaTransac;
	}

	@Column(name = "PreCosto", nullable = false, scale = 4)
	public BigDecimal getPreCosto() {
		return this.preCosto;
	}

	public void setPreCosto(BigDecimal preCosto) {
		this.preCosto = preCosto;
	}

	@Column(name = "Talle", length = 5)
	public String getTalle() {
		return this.talle;
	}

	public void setTalle(String talle) {
		this.talle = talle;
	}

	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "Colo")	
	public Colores getColores() {
		return colores;
	}

	public void setColores(Colores colores) {
		this.colores = colores;
	}


	@Transient
	public BigDecimal getTotalItem() {
		return totalItem;
	}


	

	public void setTotalItem(BigDecimal totalItem) {
		this.totalItem = totalItem;
	}


	@Transient
	public BigDecimal getTotalImpuesto() {
		return totalImpuesto;
	}


	public void setTotalImpuesto(BigDecimal totalImpuesto) {
		this.totalImpuesto = totalImpuesto;
	}

	@Transient
	public Float getPorcentajeImpuesto() {
		return porcentajeImpuesto;
	}


	public void setPorcentajeImpuesto(Float porcentajeImpuesto) {
		this.porcentajeImpuesto = porcentajeImpuesto;
	}

	@OneToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "TipoComprob")	
	public TipoComprob getTipoComprob() {
		return tipoComprob;
	}

	public void setTipoComprob(TipoComprob tipoComprob) {
		this.tipoComprob = tipoComprob;
	}



	@Transient
	public String getClave() {
		return clave;
	}

	public void setClave(String clave) {
		this.clave = clave;
	}
	@Transient
	public String getBonif1() {
		return bonif1;
	}

	public void setBonif1(String bonif1) {
		this.bonif1 = bonif1;
	}
	@Transient
	public String getBonif2() {
		return bonif2;
	}

	public void setBonif2(String bonif2) {
		this.bonif2 = bonif2;
	}
	@Transient
	public String getBonif3() {
		return bonif3;
	}

	public void setBonif3(String bonif3) {
		this.bonif3 = bonif3;
	}
	@Transient
	public String getBonif4() {
		return bonif4;
	}

	public void setBonif4(String bonif4) {
		this.bonif4 = bonif4;
	}

	
}
